# _*_ coding : utf-8 _*_
# @Time : 2022/9/11 16:15
# @Author : 软柠柠吖
# @File : 016_break
# @Project : pythonProject

import xlrd
from xlutils.copy import copy

wb = xlrd.open_workbook(r'D:\桌面\test\test.xlsx')
ws = wb.sheet_by_name('业绩表')

nwb = copy(wb)
nws = nwb.get_sheet('业绩表')

for row_num in range(1, ws.nrows):
    num = 0
    for col_num in range(1, 13):
        num += ws.cell_value(row_num, col_num)
        if num >= 100:
            nws.write(row_num, 13, ws.cell_value(0, col_num))
            break
nwb.save(r'D:\桌面\test\test.xlsx')